/*
 * 懒汉式 
 * 
 * 线程安全：getInstance方法处增加同步处理。
 * 
 * 但每次调用都会有同步处理，效率不高
 */
public class Singleton_lanhan_sync{
    private static Singleton_lanhan_sync mInstance=null;

    private Singleton_lanhan_sync(){
    }
    public static  synchronized Singleton_lanhan_sync getInstance(){
        if (mInstance == null) {
            mInstance = new Singleton_lanhan_sync();
        }
        
        return mInstance;
    }
}